Skip to content

[Artifacts] Fix example formatting and copy - #32191

Open
dinasaur404 wants to merge 8 commits into
productionfrom
artifacts-build-and-deploy-on-push
Open

[Artifacts] Fix example formatting and copy#32191
dinasaur404 wants to merge 8 commits into
productionfrom
artifacts-build-and-deploy-on-push

Conversation

@dinasaur404

Copy link
Copy Markdown
Contributor

Summary

Fixes formatting and copy in the Artifacts build and deploy example page. Adds pipeline diagrams.

Documentation checklist

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/assets/images/ @cloudflare/pm-changelogs, @cloudflare/product-owners
*.ts @cloudflare/content-engineering, @kodster28
*.astro @cloudflare/content-engineering, @kodster28
/src/content/docs/artifacts/ @elithrar, @dmmulroy, @mattzcarey, @dinasaur404, @cloudflare/product-owners

@dinasaur404
dinasaur404 force-pushed the artifacts-build-and-deploy-on-push branch from 3f44dc5 to d45b0f2 Compare July 20, 2026 22:58
@dinasaur404
dinasaur404 marked this pull request as ready for review July 20, 2026 23:02
@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review

⚠️ 4 warnings, 💡 2 suggestions found in commit 3d163c8.

👉 Fix in your agent 👈
Fix the following review findings in PR #32191 (https://github.com/cloudflare/cloudflare-docs/pull/32191).

Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
  or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order

After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.

The comment must come before the commit — the bot reads PR comments when a new
push triggers a review, so skip comments posted after the push will be missed.

---

## Code Review

### Warnings (3)

#### CR-92963577107c · Figcaption not a direct child of figure
- **File:** `src/components/ArtifactsPlatformSharedCIDiagram.astro` line 61
- **Issue:** The `<figcaption>` at line 61 is nested inside `<cfdocs-artifacts-platform-shared-ci-diagram>`, not directly inside `<figure>`. This violates the HTML spec (figcaption must be a child of figure) and prevents screen readers from associating the caption with the figure.
- **Fix:** Move `<figcaption>` so it is the first or last direct child of `<figure>`, or remove it if the figure's `aria-label` is sufficient.

#### CR-5062e3f022aa · Inconsistent event trigger type in example config
- **File:** `src/content/docs/artifacts/guides/build-and-deploy-on-push.mdx` line 237
- **Issue:** The namespace-wide trigger example uses `"type": "cf.repo.push"`, but the full Wrangler config earlier on this page uses `"cf.artifacts.repo.push"` for the same Artifacts push event. This mismatch suggests the snippet config will not match the actual event and the Workflow will never start.
- **Fix:** Change `"type": "cf.repo.push"` to `"cf.artifacts.repo.push"` to match the event type used in the rest of the guide.

#### CR-adb529c85ea0 · Inconsistent trigger target schema in example config
- **File:** `src/content/docs/artifacts/guides/build-and-deploy-on-push.mdx` line 242
- **Issue:** The shared-Workflow snippet uses a target object with `"type": "workflow"` and `"workflowName": "ci-workflow"`, while the full Wrangler config example earlier in the doc uses `"scriptName"` plus `"workflowName"`. The two target schemas contradict each other and may cause validation errors if copied as-is.
- **Fix:** Align the snippet's target object with the full config example (use `"scriptName"` and `"workflowName"`) or confirm and document the alternate schema.

### Suggestions (1)

#### CR-268e7a4da24a · Unused CSS transition
- **File:** `src/components/ArtifactsPlatformSharedCIDiagram.astro` line 111
- **Issue:** `.namespace-group` declares `transition: border-color 0.3s ease` but no rule changes its `border-color` on hover, focus, or any state change.
- **Fix:** Add a state that changes `border-color`, remove the transition, or clarify the intent with a comment.

---

## Conventions

### Warnings (1)

#### CV-d94097c5cbe0 · Scope accuracy
- **File:** PR-level finding
- **Issue:** The PR adds src/content/docs/artifacts/guides/build-and-deploy-on-push.mdx as a new page (+252/-0, status added) plus several new Astro diagram components, but the description frames the change as fixing formatting/copy on an existing Artifacts page and adding pipeline diagrams.
- **Fix:** Update the description (and title, if applicable) to mention that a new Artifacts Build and Deploy example page is being added (or clarify if an unpublished page is being introduced).

---

## Style Guide Review

### Suggestions (1)

#### SG-eb850d93456a · Spell out single-digit numerals in body text
- **File:** `src/content/docs/artifacts/guides/build-and-deploy-on-push.mdx` line 51
- **Issue:** Alt text uses `commit 1`, `commit 2`, `commit 3` instead of spelling out the numbers.
- **Fix:** Change to `commit one`, `commit two`, and `commit three`.

Code Review

This code review is in beta and may not always be helpful — use your judgment.

Warnings (3)
File Issue
src/components/ArtifactsPlatformSharedCIDiagram.astro line 61 Figcaption not a direct child of figure — The <figcaption> at line 61 is nested inside <cfdocs-artifacts-platform-shared-ci-diagram>, not directly inside <figure>. This violates the HTML spec (figcaption must be a child of figure) and prevents screen readers from associating the caption with the figure. Fix: Move <figcaption> so it is the first or last direct child of <figure>, or remove it if the figure's aria-label is sufficient.
artifacts/guides/build-and-deploy-on-push.mdx line 237 Inconsistent event trigger type in example config — The namespace-wide trigger example uses "type": "cf.repo.push", but the full Wrangler config earlier on this page uses "cf.artifacts.repo.push" for the same Artifacts push event. This mismatch suggests the snippet config will not match the actual event and the Workflow will never start. Fix: Change "type": "cf.repo.push" to "cf.artifacts.repo.push" to match the event type used in the rest of the guide.
artifacts/guides/build-and-deploy-on-push.mdx line 242 Inconsistent trigger target schema in example config — The shared-Workflow snippet uses a target object with "type": "workflow" and "workflowName": "ci-workflow", while the full Wrangler config example earlier in the doc uses "scriptName" plus "workflowName". The two target schemas contradict each other and may cause validation errors if copied as-is. Fix: Align the snippet's target object with the full config example (use "scriptName" and "workflowName") or confirm and document the alternate schema.
Suggestions (1)
File Issue
src/components/ArtifactsPlatformSharedCIDiagram.astro line 111 Unused CSS transition.namespace-group declares transition: border-color 0.3s ease but no rule changes its border-color on hover, focus, or any state change. Fix: Add a state that changes border-color, remove the transition, or clarify the intent with a comment.

Conventions

Warnings (1)
File Issue
PR Scope accuracy — The PR adds src/content/docs/artifacts/guides/build-and-deploy-on-push.mdx as a new page (+252/-0, status added) plus several new Astro diagram components, but the description frames the change as fixing formatting/copy on an existing Artifacts page and adding pipeline diagrams. Fix: Update the description (and title, if applicable) to mention that a new Artifacts Build and Deploy example page is being added (or clarify if an unpublished page is being introduced).

Style Guide Review

Suggestions (1)
File Issue
artifacts/guides/build-and-deploy-on-push.mdx line 51 Spell out single-digit numerals in body text — Alt text uses commit 1, commit 2, commit 3 instead of spelling out the numbers. Fix: Change to commit one, commit two, and commit three.
Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.
/disable-auto-review Stops automatic reviews from triggering on future pushes to this PR. Codeowners can still run /review or /full-review manually.
/rebase Rebases the PR branch against production. On conflict, attempts to resolve automatically using AI. Stops with an explanation if confidence is not high enough.

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@mia303
mia303 force-pushed the artifacts-build-and-deploy-on-push branch from c48b4eb to 3b78f59 Compare July 22, 2026 17:39
@mia303
mia303 force-pushed the artifacts-build-and-deploy-on-push branch from 3b78f59 to 47ef2f6 Compare July 30, 2026 14:42
@mia303
mia303 requested a review from a team as a code owner July 31, 2026 17:58
- **Runners** — each `runner()` call spins up an isolated sandbox and executes a shell command. You use the same commands you already run locally or in another CI system. Each runner captures its own logs, status, and output files.
- **Cache** — the `cache` option on a runner caches installed dependencies so that later runs do not reinstall them. Pass the files that determine the dependencies, such as `pnpm-lock.yaml`, to `cache.inputs`. When those files have not changed, the SDK restores the cached result instead of running the command again.

![Diagram showing three sequential commits: commit 1 has a cache miss so the install step runs and its sandbox snapshot is cached; commit 2 has an unchanged pnpm-lock.yaml so the cache key matches and the cached snapshot is served, skipping install; commit 3 has a changed pnpm-lock.yaml so the cache key misses and install runs again.](~/assets/images/artifacts/snapshot-cache-flow.svg)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

image needs a white background for dark mode


## Run the build pipeline

To run the build pipeline, the Workflow first needs the files from the pushed commit. It clones the repo, then uses runners to install dependencies, run checks, build the project, and deploy the Worker.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like can be combined into top-level context


<ArtifactsCIWorkflowDiagram />

1. **Push repo changes** — A `git push` to the Artifacts repo emits an `artifacts.push` event that identifies the pushed repo, branch, and commit.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reader, would help if doc structure walk thru the 3 steps outlined here in how it works


Artifacts events can build and deploy projects stored in Artifacts repos. When a user or agent pushes a commit, the event triggers a [Workflow instance](/workflows/build/trigger-workflows/).

Within the Workflow, continuous integration (CI) tooling caches dependencies, runs checks, and builds the project. The pipeline can deploy output as a [Worker](/workers/) or a [Workers for Platforms](/cloudflare-for-platforms/workers-for-platforms/) User Worker.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we be more specific in intro:

  • define CI pipeline with @cloudflare/ci
  • deploy output as a Worker or User Worker reads a bit awkward. Instead, "final step in your CI pipeline can deploy to your Worker or User Worker"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants